import numpy as np
import sys
import os

def read_floats_with_numpy(filename):
    # 直接读取为float32数组
    float_array = np.fromfile(filename, dtype=np.float32)
    return float_array

# 使用示例
filename = os.path.realpath(sys.argv[1])
floats = read_floats_with_numpy(filename)
print(floats)